home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / wndw70.zip / WNDW70A-.PAS < prev    next >
Pascal/Delphi Source File  |  1993-06-10  |  5KB  |  120 lines

  1. { ========================================================================== }
  2. { Wndw70.pas - unit for Multi-level Virtual Windows       ver 7.0a, 06-10-93 }
  3. {            with multi-video page and virtual window capability.            }
  4. {                                                                            }
  5. { This unit has the complete utilities for serial- or random-access, or      }
  6. { virtual multi-level windows.  It works on any IBM or compatible including  }
  7. { PCjr, IBM 3270 PC, and the PS/2 systems, in any video mode.  It uses       }
  8. { QWIK71.TPU for fast screen writing on any video page.  The complete        }
  9. { source code is available for registered users.                             }
  10. {   Copyright (C) 1993 by James H. LeMay                                     }
  11. { ========================================================================== }
  12.  
  13. {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X+}
  14.  
  15. { If undefined, these directives saves data space and about 4.0k of code. }
  16. { If you are using only video page 0, insert a space before the "$": }
  17. {$Define MultiPage }
  18.  
  19. { If you are NOT using virtual windows, insert a space before the "$": }
  20. {$Define AddVirtual }
  21.  
  22. { If you are NOT using shadows, insert a space before the "$": }
  23. {$Define AddShadows }
  24.  
  25. UNIT Wndw;
  26.  
  27. INTERFACE
  28.  
  29. USES Crt,Qwik,Wutil;
  30.  
  31. {$i w70-var.inc }
  32.  
  33. { -- Basic Window Utilities -- }
  34. procedure InitWindow      (Wattr: integer; ClearScr: boolean);
  35. function  HeapOK          (NumOfBytes: word): boolean;
  36. procedure SetCursorDefault(CursorMode: word);
  37. procedure SetWindowModes  (SumOfAllModes: word);
  38. procedure MakeWindow      (Row,Col,Rows,Cols: byte; Wattr,Battr: integer;
  39.                            BrdrSel: Borders; WindowName: WindowNames);
  40. procedure TitleWindow     (TopOrBottom,Justify: DirType;
  41.                TitleAttr: integer; const Title: string);
  42. procedure LocateCursor;
  43. procedure RestoreTurboWindow;
  44. procedure RemoveWindow;
  45.  
  46. { -- Window-relative writing utilities -- }
  47. { The WWrite* routines are very simple shells for QWrite. }
  48. { There's only one line of code so it's easy to customize your own. }
  49. procedure WWrite          (Row,Col: byte; const aStr: string);
  50. procedure WWriteC         (Row: byte; const aStr: string);
  51. procedure WWriteA         (Row,Col: byte; Attr: integer; const aStr: string);
  52. procedure WWriteAC        (Row:     byte; Attr: integer; const aStr: string);
  53. procedure WWriteSub       (Row,Col: byte; SubStringLen: word; var Chars);
  54.  
  55. procedure WGotoRC         (Row,Col: byte);
  56. procedure WGotoEos;
  57. procedure WEosToRC        (Row,Col: byte);
  58. function  WWhereR:        byte;
  59. function  WWhereC:        byte;
  60. function  WEosR:          byte;
  61. function  WEosC:          byte;
  62. procedure WEosLn;
  63. procedure WBrdrH          (Row: byte);
  64. procedure WBrdrV          (Col: byte);
  65. procedure WBrdrPart       (Row,Col: byte; Part: BrdrParts);
  66. procedure WLineH          (Row,Col,Cols: byte);
  67. procedure WLineV          (Row,Col,Rows: byte);
  68. procedure WLinePart       (Row,Col: byte; Part: BrdrParts);
  69. procedure WScrollUp;
  70. procedure WScrollDown;
  71. procedure WInsLine        (Row: byte);
  72. procedure WDelLine        (Row: byte);
  73. procedure WClrLine        (Row: byte);
  74. procedure WClrField       (Row,Col,Cols: byte; Attr: integer);
  75. procedure WClrFieldEos    (        Cols: byte; Attr: integer);
  76. procedure WClrEol         (Row,Col:      byte; Attr: integer);
  77. procedure WClrEos         (                    Attr: integer);
  78. procedure WClrTitle       (TopOrBottom: DirType);
  79. procedure WClrScr;
  80.  
  81. { -- Window management utilities -- }
  82. procedure WriteToCRT;
  83. procedure WriteToHidden   (WindowName: WindowNames);
  84. {$ifdef MultiPage }
  85. procedure WriteToPage     (PageNum: byte);
  86. procedure WriteAndViewPage(PageNum: byte);
  87. {$endif }
  88. procedure HideWindow;
  89. procedure ShowWindow      (WindowName: WindowNames);
  90. procedure MoveWindow      (NumOfRows,NumOfCols: integer);
  91. function  GetLevelIndex   (WindowName: WindowNames): word;
  92. procedure AccessWindow    (WindowName: WindowNames);
  93. procedure ChangeBorder    (NewBrdr: Borders);
  94. procedure RestoreBorder;
  95.  
  96. { -- Virtual window utilities -- }
  97. {$ifdef AddVirtual }
  98. procedure SetVirtualSize  (Rows,Cols: byte);
  99. procedure WriteToVirtual  (WindowName: WindowNames);
  100. procedure VViewRC         (Row,Col: byte);
  101. procedure VViewRCrel      (NumOfRows,NumOfCols: integer);
  102. procedure VUpdateWindow;   { Simply does the following 3 procedures: }
  103. procedure VUpdateView;
  104. procedure VUpdateTitles;
  105. procedure VUpdateCursor;
  106. procedure VUpdateRows     (Row,Rows: byte);
  107. procedure VScrollView     (NumOfRows,NumOfCols: integer);
  108. procedure VResizeWindow   (NumOfRows,NumOfCols: integer);
  109. procedure VZoomWindow;
  110. {$endif }
  111.  
  112.  
  113. IMPLEMENTATION
  114.  
  115. uses goof;
  116.  
  117.   { Complete source code provided to registered users only. }
  118.  
  119. END.
  120.